import {createVNode, render} from 'vue'
import Toast from './toasts.vue'

const customToast = function (options) {
    let container = document.createElement("div");
    let vm = createVNode(Toast, options);
    render(vm, container);
    document.body.appendChild(container);
}

const ToastAlert = {
    install(app) {
        app.config.globalProperties.$toast = customToast
    }
}

export default ToastAlert